//
//  FindCell.m
//  ToYourHeartNews
//
//  Created by XJing on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥. All rights reserved.
//

#import "FindCell.h"
#define kuan  [UIScreen mainScreen].bounds.size.width / 375
#define gao [UIScreen mainScreen].bounds.size.height / 667
@implementation FindCell
- (void)dealloc
{
    [_img release];
    [_titlelable release];
    [_stitleLable release];
    [_attentBtn release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc]init];
        //_img.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_img];
        [_img release];
        
        self.titlelable = [[UILabel alloc]init];
        // _titlelable.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_titlelable];
        [_titlelable release];
        
        self.stitleLable = [[UILabel alloc]init];
        //  _stitleLable.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:_stitleLable];
        [_stitleLable release];
        
        self.attentBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:_attentBtn];
        [_attentBtn release];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.img.frame = CGRectMake(10 * kuan, 10 * gao, 80 * kuan, 80 * gao);
    self.titlelable.frame = CGRectMake(90 * kuan, 10 * gao, 300 * kuan, 30 * gao);
    self.stitleLable.frame = CGRectMake(90 * kuan, 45 * gao, 300 * kuan, 30 * gao);
    _stitleLable.numberOfLines = 0;
    _stitleLable.textColor = [UIColor grayColor];
    _stitleLable.font = [UIFont systemFontOfSize:15];
    self.attentBtn.frame = CGRectMake(self.contentView.frame.size.width - 30, _titlelable.frame.origin.y + _titlelable.frame.size.height / 2, 20, 20);
    [_attentBtn setBackgroundImage:[UIImage imageNamed:@"iconfont-duihao-3"] forState:UIControlStateNormal];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
